<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.18"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>JCSDK C++ API Reference: JCStorage类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">JCSDK C++ API Reference
   &#160;<span id="projectnumber">2.3.3</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.18 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="class_j_c_storage-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">JCStorage类 参考<span class="mlabels"><span class="mlabel">abstract</span></span><div class="ingroups"><a class="el" href="group___xE6_x96_x87_xE4_xBB_xB6_xE5_xAD_x98_xE5_x82_xA8_xE6_xA8_xA1_xE5_x9D_x97.html">文件存储模块</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="_j_c_storage_8h_source.html">JCStorage.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:a2650ded906b3384ebed9975e5feaa658"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="class_j_c_storage_item.html">JCStorageItem</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_j_c_storage.html#a2650ded906b3384ebed9975e5feaa658">uploadFileByExpireTime</a> (const char *path, int expiredSeconds, int cookie)=0</td></tr>
<tr class="separator:a2650ded906b3384ebed9975e5feaa658"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6b8fb9cad5a5685da76108ab7b7980f1"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="class_j_c_storage_item.html">JCStorageItem</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_j_c_storage.html#a6b8fb9cad5a5685da76108ab7b7980f1">downloadFile</a> (const char *uri, const char *savePath, int cookie)=0</td></tr>
<tr class="separator:a6b8fb9cad5a5685da76108ab7b7980f1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abf36c2065abd6187be60d73737a3c11e"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_j_c_storage.html#abf36c2065abd6187be60d73737a3c11e">cancelFile</a> (<a class="el" href="class_j_c_storage_item.html">JCStorageItem</a> *item)=0</td></tr>
<tr class="separator:abf36c2065abd6187be60d73737a3c11e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0dab1d1c49e01b85851178c110a58082"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_j_c_storage.html#a0dab1d1c49e01b85851178c110a58082">cancelFileByCookie</a> (int cookie)=0</td></tr>
<tr class="separator:a0dab1d1c49e01b85851178c110a58082"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>用于上传下载文件 </p>
</div><h2 class="groupheader">成员函数说明</h2>
<a id="abf36c2065abd6187be60d73737a3c11e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abf36c2065abd6187be60d73737a3c11e">&#9670;&nbsp;</a></span>cancelFile()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool JCStorage::cancelFile </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_j_c_storage_item.html">JCStorageItem</a> *&#160;</td>
          <td class="paramname"><em>item</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>取消正在进行的文件上传下载</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">item</td><td>JCStorageItem对象，由 <a class="el" href="class_j_c_storage.html#a2650ded906b3384ebed9975e5feaa658">uploadFileByExpireTime</a> ，<a class="el" href="class_j_c_storage.html#a6b8fb9cad5a5685da76108ab7b7980f1">downloadFile</a> 返回 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd><ul>
<li>true: 成功</li>
<li>false: 失败 </li>
</ul>
</dd></dl>

</div>
</div>
<a id="a0dab1d1c49e01b85851178c110a58082"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0dab1d1c49e01b85851178c110a58082">&#9670;&nbsp;</a></span>cancelFileByCookie()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool JCStorage::cancelFileByCookie </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>cookie</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>通过cookie取消正在进行的文件上传下载</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">cookie</td><td>上传下载传入的 cookie </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd><ul>
<li>true: 成功</li>
<li>false: 失败 </li>
</ul>
</dd></dl>

</div>
</div>
<a id="a6b8fb9cad5a5685da76108ab7b7980f1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6b8fb9cad5a5685da76108ab7b7980f1">&#9670;&nbsp;</a></span>downloadFile()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="class_j_c_storage_item.html">JCStorageItem</a>* JCStorage::downloadFile </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>uri</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>savePath</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>cookie</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>下载文件</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">uri</td><td>文件地址 </td></tr>
    <tr><td class="paramname">savePath</td><td>本地文件保存地址，由用户自行指定，需精确到文件名及格式，C:\Users\86189\Documents\Juphoon\audiorecord\1600422483.wav </td></tr>
    <tr><td class="paramname">cookie</td><td>标志数据 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd><ul>
<li>成功返回 <a class="el" href="class_j_c_storage_item.html">JCStorageItem</a> 对象</li>
<li>异常返回 null </li>
</ul>
</dd></dl>

</div>
</div>
<a id="a2650ded906b3384ebed9975e5feaa658"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2650ded906b3384ebed9975e5feaa658">&#9670;&nbsp;</a></span>uploadFileByExpireTime()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="class_j_c_storage_item.html">JCStorageItem</a>* JCStorage::uploadFileByExpireTime </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>path</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>expiredSeconds</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>cookie</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>上传文件</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">path</td><td>文件路径，需精确到文件名及格式，例如：C:\Users\86189\Documents\Juphoon\audiorecord\1600422483.wav </td></tr>
    <tr><td class="paramname">cookie</td><td>标志数据 </td></tr>
    <tr><td class="paramname">expiredSeconds</td><td>过期秒数，-1表示永久 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd><ul>
<li>成功返回 <a class="el" href="class_j_c_storage_item.html">JCStorageItem</a> 对象</li>
<li>异常返回 null </li>
</ul>
</dd></dl>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>SDK/all/include/<a class="el" href="_j_c_storage_8h_source.html">JCStorage.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者 &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.18
</small></address>
</body>
</html>
